package com.visionblue.business.ship.model.repository

import android.content.SharedPreferences
import com.visionblue.business.ship.util.ext.SingletonHolderSingleArg
import com.visionblue.business.ship.util.ext.float
import com.visionblue.business.ship.util.ext.string

/**
 * @author: xlh
 * @date: 2020-06-07 8:03 PM
 * @desc:
 */
class DeviceInfoRepository private constructor(prefs: SharedPreferences) {

    var longitude: String by prefs.string("longitude", "")

    var latitude: String by prefs.string("latitude", "")

    var pin: String by prefs.string("pin", "")

    var sn: String by prefs.string("sn", "")

    var shipName: String by prefs.string("shipName", "")

    companion object :
        SingletonHolderSingleArg<DeviceInfoRepository, SharedPreferences>(::DeviceInfoRepository)
}